package reflectExample;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class Student {
    private String name;
    private int age;
    public String pub;
    protected String pro;
    String def;
    private String pri;
    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public void sleep(){
        System.out.println("……");
    }
    public void sleep(int time){
        System.out.println("sleep for "+time+" hours");
    }
}
